#ifndef LOGIN_H
#define LOGIN_H

#include <QWidget>
#include"account.h"
#include<QMap>
#include<QFile>
#include<QDebug>
#include"register_dialog.h"
#include"widget.h"
namespace Ui {
class Login;
}

class Login : public QWidget
{
    Q_OBJECT
private:
    void readFile();
    void writeFile();
public:
    explicit Login(QWidget *parent = nullptr);
    ~Login();

private slots:
    void on_pushButton_login_clicked();

    void on_pushButton_register_clicked();

    void on_checkBox_password_clicked(bool checked);

private:
    Ui::Login *ui;
    QMap<QString, Account> acc;
    register_Dialog* register_dialog;
    Widget* mainwidget;
};

#endif // LOGIN_H
